| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

Public Member Functions | Static Public Member Functions | List of all members
nkGraphics::DepthStencilState Class Referenceabstract

Holds information about a depth and stencil state used for rendering. More...

Inheritance diagram for nkGraphics::DepthStencilState:

## Public Member Functions
virtual | ~DepthStencilState ()
virtual bool | getDepthEnabled () const =0
virtual DEPTH_WRITE_MASK | getDepthMasking () const =0
virtual COMPARISON_FUNCTION | getDepthComparison () const =0
virtual bool | getStencilEnabled () const =0
virtual unsigned char | getStencilReadMask () const =0
virtual unsigned char | getStencilWriteMask () const =0
virtual STENCIL_OP | getStencilFailFrontFace () const =0
virtual STENCIL_OP | getStencilOkDepthFailFrontFace () const =0
virtual STENCIL_OP | getStencilDepthOkFrontFace () const =0
virtual COMPARISON_FUNCTION | getStencilComparisonFrontFace () const =0
virtual STENCIL_OP | getStencilFailBackFace () const =0
virtual STENCIL_OP | getStencilOkDepthFailBackFace () const =0
virtual STENCIL_OP | getStencilDepthOkBackFace () const =0
virtual COMPARISON_FUNCTION | getStencilComparisonBackFace () const =0
virtual void | resetToDefault ()=0
virtual void | setDepthEnabled (bool value)=0
virtual void | setDepthMasking (DEPTH_WRITE_MASK value)=0
virtual void | setDepthComparison (COMPARISON_FUNCTION value)=0
virtual void | setStencilEnabled (bool value)=0
virtual void | setStencilReadMask (unsigned char value)=0
virtual void | setStencilWriteMask (unsigned char value)=0
virtual void | setStencilFailFrontFace (STENCIL_OP value)=0
virtual void | setStencilOkDepthFailFrontFace (STENCIL_OP value)=0
virtual void | setStencilDepthOkFrontFace (STENCIL_OP value)=0
virtual void | setStencilComparisonFrontFace (COMPARISON_FUNCTION value)=0
virtual void | setStencilFailBackFace (STENCIL_OP value)=0
virtual void | setStencilOkDepthFailBackFace (STENCIL_OP value)=0
virtual void | setStencilDepthOkBackFace (STENCIL_OP value)=0
virtual void | setStencilComparisonBackFace (COMPARISON_FUNCTION value)=0
virtual void | exportClassToTree (nkExport::Node *rootNode)
virtual void | importClassFromTree (nkExport::Node *rootNode)
Public Member Functions inherited from nkGraphics::Resource
virtual | ~Resource ()
bool | isReadyForRendering () const
bool | isUnloaded () const
RESOURCE_LOAD_STATE | getLoadState () const
nkMemory::StringView | getPath () const
RESOURCE_TYPE | getTypeName () const
nkMemory::StringView | getName () const
System * | getSystem () const
bool | getHidden () const
bool | getGpuUploadCanBeDeferred () const
virtual void | setPath (nkMemory::StringView value)
void | setName (nkMemory::StringView value)
void | setHidden (bool value)
void | setGpuUploadCanBeDeferred (bool value)
virtual bool | load ()=0
virtual void | unload ()=0
Public Member Functions inherited from nkExport::Exportable
| Exportable () noexcept
virtual | ~Exportable ()

## Static Public Member Functions
static nkMemory::UniquePtr< DepthStencilState > | create (System *system=nullptr)

## Detailed Description

Holds information about a depth and stencil state used for rendering.

See DepthStencilStateManager::createOrRetrieve() or DepthStencilState::create() for instantiation.

## Constructor & Destructor Documentation

## ◆ ~DepthStencilState()

virtual nkGraphics::DepthStencilState::~DepthStencilState | ( |  | ) |
| virtual

Destructor. See DepthStencilStateManager::erase().

## Member Function Documentation

## ◆ getDepthEnabled()

virtual bool nkGraphics::DepthStencilState::getDepthEnabled | ( |  | ) | const
| pure virtual

Returns
  Whether the depth is used when rendering (true) or not (false).

## ◆ getDepthMasking()

virtual DEPTH_WRITE_MASK nkGraphics::DepthStencilState::getDepthMasking | ( |  | ) | const
| pure virtual

Returns
  The mask used.

## ◆ getDepthComparison()

virtual COMPARISON_FUNCTION nkGraphics::DepthStencilState::getDepthComparison | ( |  | ) | const
| pure virtual

Returns
  The comparison function used.

## ◆ getStencilEnabled()

virtual bool nkGraphics::DepthStencilState::getStencilEnabled | ( |  | ) | const
| pure virtual

Returns
  Whether the stencil is used when rendering (true) or not (false).

## ◆ getStencilReadMask()

virtual unsigned char nkGraphics::DepthStencilState::getStencilReadMask | ( |  | ) | const
| pure virtual

Returns
  The stencil read mask used.

## ◆ getStencilWriteMask()

virtual unsigned char nkGraphics::DepthStencilState::getStencilWriteMask | ( |  | ) | const
| pure virtual

Returns
  The stencil write mask used.

## ◆ getStencilFailFrontFace()

virtual STENCIL_OP nkGraphics::DepthStencilState::getStencilFailFrontFace | ( |  | ) | const
| pure virtual

Returns
  The stencil operation for front face failures (stencil and depth).

## ◆ getStencilOkDepthFailFrontFace()

virtual STENCIL_OP nkGraphics::DepthStencilState::getStencilOkDepthFailFrontFace | ( |  | ) | const
| pure virtual

Returns
  The stencil operation for a good stencil but a bad depth, front face.

## ◆ getStencilDepthOkFrontFace()

virtual STENCIL_OP nkGraphics::DepthStencilState::getStencilDepthOkFrontFace | ( |  | ) | const
| pure virtual

Returns
  The stencil operation for both stencil and depth being a success, front face.

## ◆ getStencilComparisonFrontFace()

virtual COMPARISON_FUNCTION nkGraphics::DepthStencilState::getStencilComparisonFrontFace | ( |  | ) | const
| pure virtual

Returns
  The stencil comparison function for front face checks.

## ◆ getStencilFailBackFace()

virtual STENCIL_OP nkGraphics::DepthStencilState::getStencilFailBackFace | ( |  | ) | const
| pure virtual

Returns
  The stencil operation for back face failures (stencil and depth).

## ◆ getStencilOkDepthFailBackFace()

virtual STENCIL_OP nkGraphics::DepthStencilState::getStencilOkDepthFailBackFace | ( |  | ) | const
| pure virtual

Returns
  The stencil operation for a good stencil but a bad depth, back face.

## ◆ getStencilDepthOkBackFace()

virtual STENCIL_OP nkGraphics::DepthStencilState::getStencilDepthOkBackFace | ( |  | ) | const
| pure virtual

Returns
  The stencil operation for both stencil and depth being a success, back face.

## ◆ getStencilComparisonBackFace()

virtual COMPARISON_FUNCTION nkGraphics::DepthStencilState::getStencilComparisonBackFace | ( |  | ) | const
| pure virtual

Returns
  The stencil comparison function for back face checks.

## ◆ resetToDefault()

virtual void nkGraphics::DepthStencilState::resetToDefault | ( |  | ) |
| pure virtual

Resets the state to its default values.

## ◆ setDepthEnabled()

virtual void nkGraphics::DepthStencilState::setDepthEnabled | ( | bool | value | ) |
| pure virtual

Sets whether the depth read and writes should be used during rendering.

Parameters

  value | If the depth should be enabled (true) or not (false).

## ◆ setDepthMasking()

virtual void nkGraphics::DepthStencilState::setDepthMasking | ( | DEPTH_WRITE_MASK | value | ) |
| pure virtual

Sets the depth write mask to use.

Parameters

  value | The mask to use for depth write operations.

## ◆ setDepthComparison()

virtual void nkGraphics::DepthStencilState::setDepthComparison | ( | COMPARISON_FUNCTION | value | ) |
| pure virtual

Sets the depth comparison function.

Parameters

  value | The depth comparison function to use.

## ◆ setStencilEnabled()

virtual void nkGraphics::DepthStencilState::setStencilEnabled | ( | bool | value | ) |
| pure virtual

Sets whether the stencil read and writes should be used during rendering.

Parameters

  value | If the stencil is enabled (true) or not (false).

## ◆ setStencilReadMask()

virtual void nkGraphics::DepthStencilState::setStencilReadMask | ( | unsigned char | value | ) |
| pure virtual

Sets the stencil read mask.

Parameters

  value | The mask to use.

## ◆ setStencilWriteMask()

virtual void nkGraphics::DepthStencilState::setStencilWriteMask | ( | unsigned char | value | ) |
| pure virtual

Sets the stencil write mask.

Parameters

  value | The mask to use.

## ◆ setStencilFailFrontFace()

virtual void nkGraphics::DepthStencilState::setStencilFailFrontFace | ( | STENCIL_OP | value | ) |
| pure virtual

Sets the stencil operation to use when both for depth and stencil fail, for front faces.

Parameters

  value | The stencil operation to use.

## ◆ setStencilOkDepthFailFrontFace()

virtual void nkGraphics::DepthStencilState::setStencilOkDepthFailFrontFace | ( | STENCIL_OP | value | ) |
| pure virtual

Sets the stencil operation to use when stencil passes, but depth fails, for front faces.

Parameters

  value | The stencil operation to use.

## ◆ setStencilDepthOkFrontFace()

virtual void nkGraphics::DepthStencilState::setStencilDepthOkFrontFace | ( | STENCIL_OP | value | ) |
| pure virtual

Sets the stencil operation to use when both depth and stencil pass, for front faces.

Parameters

  value | The stencil operation to use.

## ◆ setStencilComparisonFrontFace()

virtual void nkGraphics::DepthStencilState::setStencilComparisonFrontFace | ( | COMPARISON_FUNCTION | value | ) |
| pure virtual

Sets the stencil comparison function, for front faces.

Parameters

  value | The comparison function to use.

## ◆ setStencilFailBackFace()

virtual void nkGraphics::DepthStencilState::setStencilFailBackFace | ( | STENCIL_OP | value | ) |
| pure virtual

Sets the stencil operation to use when both for depth and stencil fail, for back faces.

Parameters

  value | The stencil operation to use.

## ◆ setStencilOkDepthFailBackFace()

virtual void nkGraphics::DepthStencilState::setStencilOkDepthFailBackFace | ( | STENCIL_OP | value | ) |
| pure virtual

Sets the stencil operation to use when stencil passes, but depth fails, for back faces.

Parameters

  value | The stencil operation to use.

## ◆ setStencilDepthOkBackFace()

virtual void nkGraphics::DepthStencilState::setStencilDepthOkBackFace | ( | STENCIL_OP | value | ) |
| pure virtual

Sets the stencil operation to use when both depth and stencil pass, for back faces.

Parameters

  value | The stencil operation to use.

## ◆ setStencilComparisonBackFace()

virtual void nkGraphics::DepthStencilState::setStencilComparisonBackFace | ( | COMPARISON_FUNCTION | value | ) |
| pure virtual

Sets the stencil comparison function, for back faces.

Parameters

  value | The comparison function to use.

## ◆ exportClassToTree()

virtual void nkGraphics::DepthStencilState::exportClassToTree | ( | nkExport::Node * | rootNode | ) |
| virtual

Exports an item into a tree describing its structure and its data.

Parameters

  rootNode | The node into which the object has to write its related information.

Implements nkExport::Exportable.

## ◆ importClassFromTree()

virtual void nkGraphics::DepthStencilState::importClassFromTree | ( | nkExport::Node * | rootNode | ) |
| virtual

Imports information from a tree which is supposed to describe its structure and data.

Parameters

  rootNode | The root node of the tree holding the information.

Implements nkExport::Exportable.

## ◆ create()

static nkMemory::UniquePtr<DepthStencilState> nkGraphics::DepthStencilState::create | ( | System * | system = `nullptr` | ) |
| static

Creates a standalone resource, linking it to a system, but no manager. This method can be used to allocate a resource and manually manage its lifetime.

Parameters

  system | The system to create the resource into. If left to nullptr, then the Singleton instance will be used.

Returns
  The created resource instance.

The documentation for this class was generated from the following file:

- Documentation/Headers/NilkinsGraphics/RenderStates/DepthStencilState.h